home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
DEMONSTR
/
STDM13.ZIP
/
README.TXT
< prev
next >
Wrap
Text File
|
1993-06-23
|
22KB
|
650 lines
Stdemo Player 1.3
Copyright (c) 1992,1993 Mik Kvitchko
-----------------------------
| Mikhail Kvitchko |
| 361-A Crowells Road, |
| Highland Park, NJ 08904 |
| USA |
| mik@bhsw.com |
-----------------------------
This package consists of the following files:
HIST.TXT - History of changes
README.TXT - This File
SCRIPT.TXT - Stdemo Player example script
STDEMO.DIZ - Stdemo Player short description.
STDEMO.EXE - Stdemo Player program
STHOOK.DLL - Stdemo Player DLL
What is this?
=============
Stdemo Player is the application that you can use to create demos,
tutorials or manually prepare scripts to "play" them into any Windows
application. It allows you to write a script, which will start one or
several Windows application, perform a series of keystrokes or mouse
actions aimed to demonstrate the application or to perform some pre-
defined sequence of actions. While your script is being "played", you
can disable completely keyboard and mouse, so that user will not be
able to interfere with the running demo and to cause a conflict. At
certain points of you script you may interrupt it in order to interact
with user. These interactions allow:
- to show the "text" box with some explanatory text before script
will continue ( this is the main idea of how demos
and tutorials are to be designed);
- to show the "menu" box where user can select one of several
choices, and therefore control the script's execution;
- to show the "input" box, where user can answer questions and
enter some text, which later can be used in script.
There are many varieties of these boxes in order to make your demo
flexible, and they can be forced to be shown in some convenient places
on the screen. Moreover, user can move them across the screen to be
able to see different parts of the covered windows.
Even if you are not interested in preparing demos, you may find Stdemo
Player useful. For example, you can replace your complete Startup Group
to the single Stdemo Player script which will launch
all your "startup" applications, and even perform some initial actions
for every of them: set up default options, load files, etc.
How to play the script?
======================
When you run stdemo.exe without parameters, it looks for the file
"script.txt" in the current working directory, and if it is there -
"plays" it.
Also you may pass the name of the script as a parameter to stdemo.exe.
This name may include the full path.
How to write a script?
======================
Script is a plain ASCII text file. It may include:
- keystrokes;
- commands;
- interaction breaks;
- comments.
Every keystroke, command or interaction break is a unit. Stdemo Player
reads units from the script one by one and executes them. After one
unit is executed, Stdemo Player waits for some time (time-out tick,
which can be set or changed at any point in the script) and then
executes the next unit. Time-out doesn't affect the interaction breaks
(which are "text", "menu" and "input" dialog boxes). Once one of this
boxes is shown - only user may continue or stop script execution,
selecting "Continue" or "Stop" button on the box. Comments are ignored,
as you may expect, and cause no time-out delays.
1. Keystrokes.
--------------
Any text in the script which is not a command, interaction break or
comment is a set of keystrokes, i.e. every symbol of the text causes a
keystroke to be sent into the current window application (see below).
There are also several special symbols which allow to simulate
different keyboard keys.
Any keystroke can be preceded by one or more special symbols
("@" - Alt, "#" - Shift or/and "%" - Control) as you see in the
following example:
@A Alt-A
#A Shift-A
%A Ctrl-A
#%A Shift-Ctrl-A
There are also many special keys which are coded by "escaping" them
with the "]". They are follows:
]| Down
]^ Up
]< Left
]> Right
]~ Tab
]! Return
]- PgUp
]+ PgDn
]\ Backspace
]Z Esc
]I Ins
]D Del
]H Home
]E End
]0 F10
]1 F1
...........
]9 F9
]] ]
]@ @
]% %
]# #
]: :
]$ $
This is not a full set of the keyboard keys, as you may note - but it
covers most of usable ones (I hope).
2. Commands.
------------
All commands start from the colon sign ":". Some of the commands must
be coded as a separate line in a script, others can be mixed with the
keystrokes. The rule of a thumb is: if a command has fixed format or
ends with the special separator - it can be placed anywhere, otherwise
it has to be coded as a separate line of the script. The general format
of a command is:
:<code><parameters>
<code> is a single letter or some other symbol;
<parameters> may vary; one parameter can be a letter, text or number;
parameters follow the code without blank, and in some cases are
separated one from another by the special separator "|".
The commands are:
:=x set time-out tick to x milliseconds.
Default time-out is 1 millisecond.
Example:
:=1000 set time-out tick to 1 sec.
:T skip 1 time-out tick.
Example:
abc:T:T:Tefg enter "abc", then wait for three
current time-out ticks, then enter
"efg".
:Dtext change current directory to "text".
Example:
:Dc:\windows\system
:<caption string|x find and activate already running application;
flag x may be coded as one digit 0..2 after the
separator and affects the size of the
application window: 0 (default), 1(maximize),
2(minimize).
Examples:
:<Notepad - (Untitled)|1
:) kill the last application in stack (if exists).
Note: Stdemo Player allows to start several applications.
It keeps track of the applications being started in
the internal stack ( max. 10 entries). When you start
a new application, the following keystrokes will be
sent into the new application window, as it will
get focus after the launch. You must issue ":)" -
kill last application - command, even when you finish
the application using it's menu commands - so that
Stdemo Player could handle the stack of current
applications properly.
There is no command ( so far ) to switch focus from
one application to another. Though you can do this by
simulating mouse clicking in the proper window. Just
make sure that you close applications in the reverse
order as you started them, and issue correspondent
":)" commands in the same reverse order.
:Iab enable/disable Windows input;
parameter "a" must be coded as one digit:
0 - disable input, 1 - enable input;
parameter "b" is also 1 digit:
0 - temporarily, 1 - permanently.
Example:
:I10 enable input until the next interaction break.
Note: When stdemo starts, it disables Windows input
(keyboard and mouse buttons) in order to prevent
user's intervention into the actions being played.
When one of the interaction breaks occurs, the input
is partially restored to allow user interaction
inside the dialog box only. When script continues,
the state is restored as it was before the break.
"Temporarily change the state of Windows input" means
"until the next interaction break occurs". Permanent
change affects all subsequent script play and can be
changed with the next ":I" command only.
:Cab show/hide Windows cursor;
parameter "a" must be coded as one digit:
0 - hide cursor, 1 - show cursor;
parameter "b" is also 1 digit:
0 - temporarily, 1 - permanently.
Example:
:C11 show Windows cursor until further ":C" command.
Note: When stdemo starts, it hides Windows cursor.
When one of the interaction breaks occurs, the cursor
is restored to allow user interaction inside the
dialog box only. When script continues, the state is
restored as it was before the break.
"Temporarily change the visibility of cursor" means
"until the next interaction break occurs". Permanent
change affects all subsequent script play and can be
changed with the next ":C" command only.
:Ltext assign the label "text" to the